﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using Util.Applications;

namespace IterationLife.Football.MTSports.Dtos.Sports {
    /// <summary>
    /// 体育比赛数据传输对象
    /// </summary>
    [DataContract]
    public class SportEventDto : DtoBase {
        /// <summary>
        /// 合作放比赛Id
        /// </summary>
        [StringLength( 200, ErrorMessage = "合作放比赛Id输入过长，不能超过200位" )]
        [Display( Name = "合作放比赛Id" )]
        [DataMember]
        public string PartnerEventId { get; set; }
        
        /// <summary>
        /// 比赛类型
        /// </summary>
        [Required(ErrorMessage = "比赛类型不能为空")]
        [Display( Name = "比赛类型" )]
        [DataMember]
        public int EventType { get; set; }
        
        /// <summary>
        /// 开始时间
        /// </summary>
        [Display( Name = "开始时间" )]
        [DataMember]
        public DateTime? StartTime { get; set; }
        
        /// <summary>
        /// 结束时间
        /// </summary>
        [Display( Name = "结束时间" )]
        [DataMember]
        public DateTime? EndTime { get; set; }
        
        /// <summary>
        /// 天气
        /// </summary>
        [StringLength( 20, ErrorMessage = "天气输入过长，不能超过20位" )]
        [Display( Name = "天气" )]
        [DataMember]
        public string Weather { get; set; }
        
        /// <summary>
        /// 湿度
        /// </summary>
        [StringLength( 20, ErrorMessage = "湿度输入过长，不能超过20位" )]
        [Display( Name = "湿度" )]
        [DataMember]
        public string Humidity { get; set; }
        
        /// <summary>
        /// 温度
        /// </summary>
        [StringLength( 20, ErrorMessage = "温度输入过长，不能超过20位" )]
        [Display( Name = "温度" )]
        [DataMember]
        public string Temperature { get; set; }
        
        /// <summary>
        /// 场地类型
        /// </summary>
        [StringLength( 20, ErrorMessage = "场地类型输入过长，不能超过20位" )]
        [Display( Name = "场地类型" )]
        [DataMember]
        public string GrassType { get; set; }
        
        /// <summary>
        /// 人数
        /// </summary>
        [Required(ErrorMessage = "人数不能为空")]
        [Display( Name = "人数" )]
        [DataMember]
        public int PersonCnt { get; set; }
        
        /// <summary>
        /// 定位
        /// </summary>
        [StringLength( 500, ErrorMessage = "定位输入过长，不能超过500位" )]
        [Display( Name = "定位" )]
        [DataMember]
        public string FieldPlace { get; set; }
        
        /// <summary>
        /// 球场名称
        /// </summary>
        [StringLength( 500, ErrorMessage = "球场名称输入过长，不能超过500位" )]
        [Display( Name = "球场名称" )]
        [DataMember]
        public string FieldName { get; set; }
        
        /// <summary>
        /// 全场数据
        /// </summary>
        [Display( Name = "全场数据" )]
        [DataMember]
        public string JsonData { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        [Display( Name = "创建时间" )]
        [DataMember]
        public DateTime? CreationTime { get; set; }
        
        /// <summary>
        /// 创建人
        /// </summary>
        [Display( Name = "创建人" )]
        [DataMember]
        public Guid? CreatorId { get; set; }
        
        /// <summary>
        /// 最后修改时间
        /// </summary>
        [Display( Name = "最后修改时间" )]
        [DataMember]
        public DateTime? LastModificationTime { get; set; }
        
        /// <summary>
        /// 最后修改人
        /// </summary>
        [Display( Name = "最后修改人" )]
        [DataMember]
        public Guid? LastModifierId { get; set; }
        
        /// <summary>
        /// 是否删除
        /// </summary>
        [Required(ErrorMessage = "是否删除不能为空")]
        [Display( Name = "是否删除" )]
        [DataMember]
        public bool IsDeleted { get; set; }
        
        /// <summary>
        /// 版本号
        /// </summary>
        [Display( Name = "版本号" )]
        [DataMember]
        public Byte[] Version { get; set; }
        
        /// <summary>
        /// 输出体育比赛状态
        /// </summary>
        public override string ToString() {
            return this.ToEntity().ToString();
        }
    }
}
